<div class="row">
	<div class="col col-sm-6 col-xs-6">
		<a href="#ane/demo_autoTask.html" class="btn btn-default"> &lt; 返回</a>
	</div>
	<div class="col col-sm-6 col-xs-6">
		<a href="#" class="btn btn-default pull-right"><i class="fa fa-shopping-cart"></i> 编辑页面布局</a>
	</div>
</div>
<div class="row"><br /></div>
<div class="well well-light no-padding">
	<form action="" class="smart-form" novalidate="novalidate" id="info-form">
		<div id="inbox-content" class="inbox-body">
			<div class="inbox-Right">
				<header>基本信息</header>
				<fieldset>
					<div class="col col-6">
						<div class="row">
							<label class="label col col-4 text-align-right txt-color-red">班次名称</label>
							<section class="col col-8">
								<label class="input">
									<input type="text" class="input-sm"   name="tid" placeholder="北京-郑州-广州" >
								</label>
							</section>
						</div>
					</div>
					<div class="clearfix"></div>
					<div class="col  col-6">
						<div class="row">
							<label class="label col col-4 text-align-right txt-color-red">班线名称</label>
							<section class="col col-8">
								<label class="input">
									<input type="text" class="input-sm" style="width:100%"  name="tid" placeholder="北京-郑州-广州" value=""  id="e6">
								</label>
							</section>
						</div>
					</div>
					<div class="col  col-6">
						<div class="row">
							<label class="label col col-4 text-align-right">发车时间</label>
							<section class="col col-8">
								<label class="input">
									<input type="text" name="drivername" placeholder="" value="23:30">
								</label>
							</section>
						</div>
					</div>
					<div class="col  col-6">
						<div class="row">
							<label class="label col col-4 text-align-right">承运方</label>
							<section class="col col-8">
								<div class="inline-group">
									<label class="radio"><input type="radio" id="endtype_1" checked="checked" value="1" checked="checked" name="endtype"><i></i>安能承运</label>
									<label class="radio"><input type="radio" onclick="" value="2" id="endtype_2" name="endtype"><i></i>承运商承运</label>
								</div>
							</section>
						</div>
					</div>
					<div class="col  col-6">
						<div class="row">
							<label class="label col col-4 text-align-right">选择承运商</label>
							<section class="col col-8">
								<label class="input">
									<input type="text" class="input-sm" style="width:100%"  name="tid" placeholder="SQWL/狮桥物流" value=""  id="e7">
								</label>
							</section>
						</div>
					</div>
				</fieldset>	
				<header style="" id="regularly_head">发车周期设置</header>
				<fieldset id="regularly_field">
 
		            <div class="col-xs-12 col-sm-6 col-md-6">
		                <div class="row">
		                    <label class="label col col-4 text-align-right  ">定期类型</label>
		                    <section class="col col-8">
								<div class="inline-group">
									<label class="radio"><input type="radio" onclick="Changedate(1)" value="1" checked="checked" name="datetype" id="datetype_1"><i></i>按天</label>
									<label class="radio"><input type="radio" onclick="Changedate(2)" value="2" name="datetype" id="datetype_2"><i></i>按周</label>
								</div>
		                    </section>
		                </div>
		            </div>
		 
		            <div class="col-xs-12 col-sm-6 col-md-6" id="daynum_isshow">
		                <div class="row">
		                    <label class="label col col-4 text-align-right  ">间隔天数</label>
		                    <section class="col col-8">
		                        <label class="select">
								<select name="daynum" id="daynum">
									<option value="0">天天发车</option>
									<option value="1">每隔1天发车</option>
									<option value="2">每隔2天发车</option>
									<option value="3">每隔3天发车</option>
									<option value="4">每隔4天发车</option>
									<option value="5">每隔5天发车</option>
									<option value="6">每隔6天发车</option>
								</select> <i></i> </label>
		                    </section>
		                </div>
		            </div>
					<div style="display:none" class="col-xs-12 col-sm-6 col-md-6" id="classweek_isshow">
		                <div class="row">
		                    <label class="label col col-4 text-align-right  ">重复周期</label>
		                    <section class="col col-8">
							<div class="inline-group">
		                        <label class="checkbox"><input type="checkbox" value="1" checked="checked" name="classweek[]" id="classweek_1"><i></i>每逢 周一 发车</label>
		                        <label class="checkbox"><input type="checkbox" value="2" checked="checked" name="classweek[]" id="classweek_2"><i></i>每逢 周二 发车</label>
		                        <label class="checkbox"><input type="checkbox" value="3" checked="checked" name="classweek[]" id="classweek_3"><i></i>每逢 周三 发车</label>
		                        <label class="checkbox"><input type="checkbox" value="4" checked="checked" name="classweek[]" id="classweek_4"><i></i>每逢 周四 发车</label>
		                        <label class="checkbox"><input type="checkbox" value="5" checked="checked" name="classweek[]" id="classweek_5"><i></i>每逢 周五 发车</label>
		                        <label class="checkbox"><input type="checkbox" value="6" checked="checked" name="classweek[]" id="classweek_6"><i></i>每逢 周六 发车</label>
		                        <label class="checkbox"><input type="checkbox" value="7" checked="checked" name="classweek[]" id="classweek_7"><i></i>每逢 周日 发车</label>						
								</div>
		                    </section>
		                </div>
		            </div>
		            <!--<div class="col-xs-12 col-sm-6 col-md-6">
		                <div class="row">
		                    <label class="label col col-4 text-align-right  ">开始日期</label>
		                    <section class="col col-8">
							<label class="input">
									<i class="icon-prepend fa fa-calendar"></i>
									<input type="text" maxlength="10" id="startdate" name="startdate" value="2014-02-01">
									
								</label>
		                    </section>
		                </div>
		            </div>-->
		 
		            <div class="col-xs-12 col-sm-6 col-md-6">
		                <div class="row">
		                    <label class="label col col-4 text-align-right  ">结束类型</label>
		                    <section class="col col-8">
								<div class="inline-group">
									<label class="radio"><input type="radio" id="endtype_1" onclick="Changeend(1)" value="1" checked="checked" name="endtype"><i></i>永不结束</label>
									<label class="radio"><input type="radio" onclick="Changeend(2)" value="2" id="endtype_2" name="endtype"><i></i>发生次数</label>
									<label class="radio"><input type="radio" onclick="Changeend(3)" value="3" id="endtype_3" name="endtype"><i></i>到达某天</label>
								</div>
		                    </section>
		                </div>
		            </div>
		            <div style="display:none" class="col-xs-12 col-sm-6 col-md-6" id="plannum_isshow">
		                <div class="row">
		                    <label class="label col col-4 text-align-right  ">计划发生次数</label>
		                    <section class="col col-8">
		                        <label class="input">
		                            <input type="text" value="365" placeholder="365" name="plannum" id="plannum">
		                        </label>
		                    </section>
		                </div>
		            </div>
		 
		            <div style="display:none" class="col-xs-12 col-sm-6 col-md-6" id="enddate_isshow">
		                <div class="row">
		                    <label class="label col col-4 text-align-right  ">结束日期</label>
		                    <section class="col col-8">
							<label class="input">
									<i class="icon-prepend fa fa-calendar"></i>
									<input type="text" value="2014-02-01" name="enddate" id="enddate" maxlength="10">
								</label>
		                    </section>
		                </div>
		            </div>
				</fieldset>
			</div>
			
		</div>		
		<footer>
			<div style="margin:0 auto">
			<button type="submit" class="btn btn-default">取消</button>
			<button type="submit" class="btn btn-default">保存并新建</button>
			<button type="submit" class="btn btn-primary">
				<i class="fa fa-save"></i>
				保存
			</button>	</div>			
		</footer>		
	</form>
	<div class="inbox-preview" id="yulanbox">
		<!-- 开始班线 -->
		<div class="well well-sm">
			<!-- Timeline Content -->
			<h6 class="text-center">计划预览</h6>
			<div class="classLine smart-timeline">
				
				<ul class="smart-timeline-list">
					<li class="special">
						<!-- <div class="smart-timeline-list-green"></div> -->
						<div class="smart-timeline-icon">
							<div class="timeline-icon-green"></div>
						</div>
						<div class="smart-timeline-arrow"></div>
						<div class="smart-timeline-time banxian_city padding-5">
							北京分拨
						</div>
						<div class="smart-timeline-content clearfix">
							<div class="col-xs-12 padding-5">
								<i class="fa fa-arrow-circle-o-down"></i> 23:00
							</div>
						</div>
					</li>
					<li>
						<!-- <div class="smart-timeline-list-green"></div> -->
						<div class="smart-timeline-content no-border row">
							<div class="col-xs-12 padding-5">
								<i class="fa fa-clock-o"></i> 10小时			
							</div>
						</div>
						<div class="smart-timeline-icon">
							<div class="timeline-icon-green"></div>
						</div>
						<div class="smart-timeline-arrow"></div>
						<div class="smart-timeline-time banxian_city padding-5">
							郑州分拨
						</div>
						<div class="smart-timeline-content clearfix">
							<div class="col-xs-12 padding-5">
								<p><i class="fa fa-angle-double-down"></i> 09:00 第一天 </p>
								<p><i class="fa fa-dot-circle-o"></i> 60分钟 </p>
								<i class="fa fa-angle-double-down"></i> 10:00 第二天
							</div>
						</div>
					</li>
					<li class="special s2">
						<div class="smart-timeline-content no-border row">
							<div class="col-xs-12 padding-5">
								<i class="fa fa-clock-o"></i> 24小时			
							</div>
						</div>
						<div class="smart-timeline-icon">
							<div class="timeline-icon-green"></div>
						</div>
						<div class="smart-timeline-arrow"></div>
						<div class="smart-timeline-time banxian_city padding-5">广州分拨</div>
						<div class="smart-timeline-content padding-5">
							<i class="fa fa-arrow-circle-o-down"></i> 10:00	第三天									
						</div>
					</li>
				</ul>
			</div>
			
			<div class="well well-sm no-border no-margin">
				<h6>总里程：2180公里</h6>
				<h6>总耗时：34小时</h6>
				<h6>停留总耗时：60分</h6>
			</div>
			<!-- END Timeline Content -->
		</div>
	  	<!-- 结束班线 -->
	</div>
</div>
<!-- Modal -->
<div class="modal fade" id="myModal"  role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
					&times;
				</button>
				<h4 class="modal-title" id="myModalLabel">选择途经站点</h4>
			</div>
			<div class="modal-body">
				<form class="smart-form" action="" id="frm_PassMarker" novalidate="novalidate">
				<div class="row">
					<div class="col-xs-12 col-sm-8 col-md-12 col-lg-12">				
						<label class="label col-xs-12 col-sm-3 text-align-right txt-color-red">途经点</label>
						<section class="col col-8">
							<label class="input">
								<div class="select2-container form-control select2-allowclear" id="s2id_Marker_P"><a tabindex="-1" class="select2-choice" onclick="return false;" href="javascript:void(0)">   <span class="select2-chosen">郑州分拨中心</span><abbr class="select2-search-choice-close"></abbr>   <span class="select2-arrow"><b></b></span></a><input type="text" class="select2-focusser select2-offscreen" id="s2id_autogen1"></div><input type="text" name="Marker_P" id="Marker_P" data-placeholder="选择站点" class="form-control select2-offscreen" tabindex="-1">
							</label>
						</section>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">				
						<label class="label col-xs-8 col-sm-3 text-align-right txt-color-red">行驶里程(公里)</label>
						<section class="col col-6">
							<label class="input">
								<input type="text" name="Mileage_P" id="Mileage_P" placeholder="行驶里程(公里)" class="form-control" value="740">
							</label>
						</section>
						<section style="" id="autocount_P_sec" class="col col-2">
								<button onclick="autoCountMileage('P')" class="btn btn-primary btn-sm" type="button">自动计算</button>
						</section>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">				
						<label class="label col-xs-8 col-sm-3 text-align-right txt-color-red ">行驶时间(分)</label>
						<section class="col col-8">
							<label class="input">
								<input type="text" name="Runtime_P" id="Runtime_P" placeholder="行驶时间(分)" class="form-control" value="600">
							</label>
						</section>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">				
						<label class="label col-xs-12 col-sm-3 text-align-right txt-color-red">停留时间(分)</label>
						<section class="col col-8">
							<label class="input">
								<input type="text" name="Stoptime_P" id="Stoptime_P" placeholder="停留时间(分)" class="form-control" value="60">
							</label>
						</section>
					</div>
				</div>
				</form>

			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-primary">
					保存
				</button>
				<button type="button" class="btn btn-default" data-dismiss="modal">
					取消
				</button>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- daterangepicker JS -->
<script src="js/plugin/date/moment.js"></script>
<script src="js/plugin/date/daterangepicker.js"></script>
<script type="text/javascript">

	// DO NOT REMOVE : GLOBAL FUNCTIONS!
	pageSetUp();
	
	$(function(){
		$("#e7").select2({  //自动完成
		    placeholder: "快速查找",
			allowClear: true,
		    minimumInputLength: 1,
		    data:[{id:0,text:'大禹车队'},{id:1,text:'圣嘉物流'},{id:2,text:'石桥物流'},{id:3,text:'中南运输'},{id:4,text:'广丰物流'}]
		});
		$("#e6").select2({  //自动完成
		    placeholder: "aaaaa",
			allowClear: true,
		    minimumInputLength: 1,
		    data:[{id:0,text:'enhancement'},{id:1,text:'bug'},{id:2,text:'duplicate'},{id:3,text:'invalid'},{id:4,text:'wontfix'}]
		});
		$("#e7").select2({  //自动完成
		    placeholder: "aaaaa",
			allowClear: false,
		    minimumInputLength: 1,
		    data:[{id:0,text:'enhancement'},{id:1,text:'bug'},{id:2,text:'duplicate'},{id:3,text:'invalid'},{id:4,text:'wontfix'}]
		});
		
		$("#clearMoreRe").click(function(){
			$("#moreResult").hide();
		})
	})

	//调整表单部分的容器高度，以使其不小于预览容器
	$(function changeHeight(){
		var ylHeight = $("#yulanbox").height()+15;
		var icHeight = $("#inbox-content").height();
		$("#inbox-content").css("min-height",icHeight < ylHeight ? ylHeight:icHeight);
		//console.log(ylHeight+","+icHeight);
	})
	
	function addZhandian(){
		$('#myModal').modal();
	}

	// Load form valisation dependency 
	loadScript("js/plugin/jquery-form/jquery-form.min.js", runFormValidation);
	
	
	// Registration validation script
	function runFormValidation() {
		var $checkoutForm = $('#info-form').validate({
		// Rules for form validation
			rules : {
				drivername : {
					required : true,
					maxlength : 12
				},
				org : {
					required : true,
				},
				mobile_no : {
					required : true,
					number : true,
				},
			},
			// Messages for form validation
			messages : {
				drivername : {
					required : '必填项',
					maxlength : '最长12个字'
				},
				mobile_no : {
					required : '必填项',
					number : '11位数字'
				},
				org : {
					required : '必填项',
				},
			},
			// Do not change code below
			errorPlacement : function(error, element) {
				error.insertAfter(element.parent());
			}
		});
	}
</script>


